# -*- coding: utf-8 -*-
# @Time : 2024/1/29 9:24 AM 
# @Author : Wayne
# @Email : 1
# @File : array_continue.py
# @Project : young_python_demo
# @DESCRIPTION :

list_a = [
    {
        "name": "Peter",
        "address": "shanghai",
        "age":1
    },
    {
        "name": "Jack",
        "address": "beijing",
        "age": 0
    },
    {
        "name": "Jack1",
        "address": "beijing1",
"age": 1
    },
    {
        "name": "Jack222",
        "address": "beijing333",
"age": 55
    }
]
"""
continue是结束当前循环，加上continue，此代码后面的 for 循环里面代码不会执行
{'name': 'Peter', 'address': 'shanghai'}
Jack
{'name': 'Jack1', 'address': 'beijing1'}
{'name': 'Jack222', 'address': 'beijing333'}
我是 for 循环外面代码
"""
result_address = ""
result_list = []
for i in list_a:
    age = i["age"]
    if age == 0:
        continue
    result_list.append(i)
for k in result_list:
    print(k)
print("我是 for 循环外面代码")
